//
//  SSMyPurseViewController.swift
//  拾舍清洁
//
//  Created by sky.wei on 2023/4/21.
//

import UIKit

class SSMyPurseViewController: UIViewController {

    @IBOutlet weak var tableView: UITableView!
    
    @IBOutlet weak var cardBGView: UIView!
    
    @IBOutlet weak var moneyLab: UILabel!
    
    @IBOutlet weak var userName: UILabel!
    override func viewDidLoad() {
        super.viewDidLoad()

        setupUIs()
    }
    
    func setupUIs() {
        title = "我的钱包"
        
        cardBGView.layer.masksToBounds = true
        cardBGView.layer.cornerRadius = 10
        
        tableView.delegate = self
        tableView.dataSource = self
        tableView.layer.masksToBounds = true
        tableView.layer.cornerRadius = 12
        tableView.layer.borderColor = UIColor(hex: "#a6a6a6")?.cgColor
        tableView.layer.borderWidth = 0.5
        tableView.register(UINib(nibName: "SSPurseListCell", bundle: Bundle.init(for: SSPurseListCell.self)), forCellReuseIdentifier: "SSPurseListCell")
        tableView.separatorStyle = .none

    }

   override func viewDidLayoutSubviews() {
       super.viewDidLayoutSubviews()
    
    }

}

extension SSMyPurseViewController :UITableViewDelegate,UITableViewDataSource{
    func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
        20
    }
    
    func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
        let cell = tableView.dequeueReusableCell(withIdentifier: "SSPurseListCell") as! SSPurseListCell
        return cell
    }
    
    func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
        return 64
    }
    
}
